package cn.bd13.xinapp.dao.web;

import cn.bd13.xinapp.model.dto.AddForm;
import cn.bd13.xinapp.model.dto.MenuVo;
import cn.bd13.xinapp.model.entity.Admin;
import cn.bd13.xinapp.model.entity.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminDao {

    Admin getAdminByPhone(@Param("phone") String phone);

    Admin getAdminById(@Param("aid") int aid);

    List<MenuVo> getFirstLevelMenus(@Param("adminType") int adminType);

    List<Menu> getSecondLevelMenus(@Param("adminType") int adminType, @Param("subid") int subid);

    List<Admin> queryAdmin(@Param("query")String query,
                           @Param("pagesize")int pagesize,
                           @Param("index")int index);

    int queryAdminCount(@Param("query")String query);

    int updAdminStatus(@Param("aid")int aid,@Param("status")int status);

    int addAdmin(AddForm form);

}
